package types;

import org.apache.log4j.Logger;

import config.DatabaseConnection;

public class Keyword implements DBTableTypes
{
    private String keyword;
    
    // Logger
    @SuppressWarnings("unused")
    private static Logger myLogger = Logger.getLogger(Keyword.class.getName()); 
    
    
    /**
     * Constructor
     * 
     * @param keyword
     */
    public Keyword(String keyword)
    {
	super();
	this.keyword = keyword;
    }



    @Override
    public boolean keep()
    {
	String query = "" + "INSERT INTO keywords " + "(Keyword) " + "VALUES ('" + keyword + "')";
	String tableName="Keywords";
	return DatabaseConnection.executeQuery(query, tableName);
    }
    
 // Overloaded methods
    @Override
    public String toString()
    {
	return "Keyword [keyword=" + keyword + "]";
    }
}
